$(".delbox").draggable();
var table = $("#dataTables-example").DataTable({
	ajax: {
		url: "http://m.aidong.me:9999/gym/user/slave/stores/all",
		type: "get",
		beforeSend: function(request) {
			request.setRequestHeader("token", localStorage.getItem("token"));
		},
	},
	columns: [{
			data: "company_id"
		},
		{
			data: "name"
		},
		{
			data: "area"
		},
		{
			data: "id",
			render: function(data, type, full) {
				return "<a href='../update-city/update-city.html'>编辑</a><a href='javascript:void(0);' style='margin-left:5px' class='deltel'>删除</a>"
			}
		}
	],
	responsive: false,
	bLengthChange: false,
	bSort: false,
	paging: true,
	bFilter: true,
	searching: false,
	bInfo: true,
	bAutoWidth: true,
	"oLanguage": {
		"sLengthMenu": "每页显示 _MENU_ 条记录",
		"sZeroRecords": "抱歉， 没有找到",
		"sInfo": "从 _START_ 到 _END_ /共 _TOTAL_ 条数据",
		"sInfoEmpty": "没有数据",
		"sInfoFiltered": "(从 _MAX_ 条数据中检索)",
		"oPaginate": {
			"sFirst": "首页",
			"sPrevious": "前一页",
			"sNext": "后一页",
			"sLast": "尾页"
		},
		"sSearch": "查询条件:",
		"sZeroRecords": "没有检索到数据",
		"sProcessing": "<img src='./loading.gif' />"
	}
});
$("#dataTables-example").on('click', '.deltel', function() {
	$(".delbox").show();
	$(".bgc").show();
});
$(".cancel").on('click', function() {
	$(".delbox").hide();
	$(".bgc").hide();
});